<template>
  <div>
      <h1>在路上，永远年轻，永远热泪盈眶</h1>
    <div id="container"></div>
  </div>
</template>

<script>
// 引入echarts
 import * as echarts from 'echarts';
export default {
  data() {
    return {};
  },
  mounted() {
    //当组件一加载就渲染 数据图表（数据可视化）
    let mycahrt = echarts.init(document.getElementById("container"));
    let options = {
      xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        data: [820, 932, 901, 934, 1290, 1330, 1320],
        type: 'line',
        smooth: true
    }]
    };
    //设置配置项
    mycahrt.setOption(options)
  },
};
</script>

<style lang="stylus" scoped>
#container
    width 800px
    height 600px
</style>

